﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Xml.Linq;
using ThreeByte.ActiveDeck.Publish.Model;

namespace ThreeByte.ActiveDeck.Publish
{
    public interface IPublisher
    {
        IAsyncResult BeginPublishMessage(string channel, XElement body, AsyncCallback callback, object state);
        int EndPublishMessage(IAsyncResult result);

        IAsyncResult BeginSubscribe(IDictionary<string, int> subscriptions, TimeSpan timeout, AsyncCallback callback, object state);
        IEnumerable<ActiveMessage> EndSubscribe(IAsyncResult result);

        IAsyncResult BeginGetChannels(string prefix, AsyncCallback callback, object state);
        Dictionary<string, int> EndGetChannels(IAsyncResult result);
    }
}
